package com.woniuxy.food.client.foodskuclient;

import com.woniuxy.food.client.param.InsertFoodSkuParam;
import com.woniuxy.food.client.param.UpdateFoodSkuParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import result.Result;

import java.math.BigDecimal;

@FeignClient(contextId = "foodSkuManageClient",name = "food")
public interface FoodSkuManageClient {
    @PostMapping("/insertFoodSku")
    public Result insertFoodSku(@RequestBody InsertFoodSkuParam param);

    @PutMapping("/updateFoodSkuStateByIds")
    public Result updateFoodSkuStateByIds(@RequestParam("storeId")Integer storeId,@RequestParam("ids") Integer[] ids,@RequestParam("skuState") String skuState);

    @PutMapping("/updateFoodSku")
    public Result updateFoodSku(@RequestBody UpdateFoodSkuParam param);

    @PutMapping("/updateFoodSkuSalesCount")
    public Result updateFoodSkuSalesCount(@RequestParam("storeId")Integer storeId,@RequestParam("skuId") Integer skuId,@RequestParam("salesCount")Long salesCount);

    @PutMapping("/updateFoodSkuDiscountPrice")
    public Result updateFoodSkuDiscountPrice(@RequestParam("storeId")Integer storeId,@RequestParam("skuId") Integer skuId,@RequestParam("discountPrice") BigDecimal discountPrice);

    @DeleteMapping("/deleteFoodSkuByIds")
    public Result deleteFoodSkuByIds(@RequestParam("storeId")Integer storeId,@RequestParam("ids") Integer[] ids);
}
